<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@page import="com.mvc.security.model.Menu"%>
<%@ include file="/pages/common/header.jsp"%>
	<jdf:themeFile file="fckeditor/fckeditor.js" />
</head>
<body>
	<div class="contentBody contentBodyborder">
		<div class="tab-pane" id="tabPane">
			<div id="message"><%=message%></div>
			<div class="tab-page" id="tabPage1">
				<h1 class="tab">公告配置</h1>
				<div class="contentborder tableForm">
					<jdf:form bean="entity" scope="request">
						<form action="<%=dynamicDomain%>/notice/save" method="post">
							<input type="hidden" name="id">
							<input type="hidden" name="objectId">
							<table class="inputTable">
								<tr class="BorderBottom">
									<td nowrap class="label cancelBorderLeft">
									  <label for="title">标题：</label>
									</td>
									<td class="content" colspan="3">
									   <input type="text" name="title" size="50"/>
									</td>
								</tr>
								<tr class="BorderBottom">
									<td nowrap class="label cancelBorderLeft">
									  <label for="effectiveDate">生效日期：</label>
									</td>
									<td class="content">
									    <input type="text" id="effectiveDate" name="effectiveDate" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'expireDate\')}',readOnly:true})">
									</td>
									<td nowrap class="label">
									    <label for="expireDate">失效日期：</label>
									</td>
									<td class="content">
									    <input type="text" id="expireDate" name="expireDate" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'effectiveDate\')}',readOnly:true})">
									</td>
								</tr>
								<tr>
									<td nowrap class="label cancelBorderLeft">
									  <label for="content">内容：</label>
									</td>
									<td class="content" colspan="3">
									     <textarea type="text" name="content" id="txt"></textarea> 
											<script type="text/javascript">
											var txt = new FCKeditor("txt");
											txt.BasePath = "<%=DomainUtils.getStaticDomain()%>js/fckeditor/";
											txt.Config["CustomConfigurationsPath"]="<%=DomainUtils.getStaticDomain()%>js/fckeditor/myconfig.js";
				
											txt.Config["LinkBrowser"] = false ;
											txt.Config["ImageBrowser"] = false ;
											txt.Config["FlashBrowser"] = false ;
											txt.Config["MediaBrowser"] = false ;
				
											txt.Config["LinkUpload"] = true ;
											txt.Config["ImageUpload"] = true ;
											txt.Config["FlashUpload"] = true ;
											txt.Config["MediaUpload"] = true ;
											txt.Config["LinkBrowserURL"] = txt.BasePath + 'filemanager/browser/default/browser.html?Type=Link&Connector=' + encodeURIComponent("<%=request.getContextPath()%>/upload");
											txt.Config["ImageBrowserURL"] = txt.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=' + encodeURIComponent("<%=request.getContextPath()%>/upload");
											txt.Config["FlashBrowserURL"] = txt.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=' + encodeURIComponent("<%=request.getContextPath()%>/upload");
											txt.Config["MediaBrowserURL"] = txt.BasePath + 'filemanager/browser/default/browser.html?Type=Media&Connector=' + encodeURIComponent("<%=request.getContextPath()%>/upload");
				
											txt.Config["ImageUploadURL"] = '<%=request.getContextPath()%>/upload';
											txt.Config["FlashUploadURL"] = '<%=request.getContextPath()%>/upload';
											txt.Config["MediaUploadURL"] = '<%=request.getContextPath()%>/upload';
				
											txt.ToolbarSet="Simple";
											txt.Height= 300;
											txt.Width = "98%";
											txt.ReplaceTextarea();
									        </script>
									</td>
								</tr>
								<tr>
									<td class="bottomLabel" nowrap colspan="4">
										<div class="right">
											<button type="submit">提交</button>
											<c:if test="${not empty message}">
											<button type="button" onclick="toUrl('<%=dynamicDomain%>/notice/create')">继续增加</button>
											</c:if>
											<button type="button" onclick="toUrl('<%=dynamicDomain%>/notice/back')">返回</button>
										</div>
									</td>
								</tr>
								
							</table>
						</form>
					</jdf:form>
				</div>
			</div>
		</div>
		<jdf:tableLabelValidate domain="Notice" />
		<script type="text/javascript">
		
		 function cumstomerFormValidate(){
			 var $content = $("#txt");
			 if($content.val() == ''){
				 f_v_r +='公告内容不能为空!\n';
				 $('#txt').addClass("onError");
			 } else {
				 $('#txt').addClass("onSuccess");
			 }
		 }
		</script>
	</div>
</body>
</html>